﻿@model EnetaMvc.Web.Models.ForumTopicModel
@{
	Layout = "~/Views/Shared/_ForumsLayout.cshtml";
}
@section TopRssLinks {
	<ul class="small-menu rss-menu">
	<li><a href="@Url.Content("~/forums/forum/" + Model.Forum.Id + "/rss")">RSS: @Model.Forum.Name</a></li>
	</ul>
}
@section BottomRssLinks {
	<ul class="small-menu rss-menu">
	<li><a href="@Url.Content("~/forums/forum/" + Model.Forum.Id + "/rss")">RSS: @Model.Forum.Name</a></li>
	</ul>
}
<p class="ms-navheader"> 
	<a href='@Url.Content("~/forums/category/" + Model.Forum.CategoryId)'>@Model.Forum.CategoryName</a> » 
	<a href='@Url.Content("~/forums/forum/" + Model.Forum.Id)'>@Model.Forum.Name</a> » 
	<a href='@Url.Content("~/forums/topic/" + Model.Posts[0].Id)'>@Model.Posts[0].Title</a>
</p>

<table width="100%" cellspacing="0" cellpadding="3" class="forums-tools"><!-- Lembit 29.06.2009: added class="forums-tools" --> 
	<tr> 
		<td align="left">&nbsp;</td> 
		<td align="right"> 
		<!-- Lembit 8.11.2009: added wrapper div w/ class="button" to links below --> 			
			<div class="button"><a href="@Url.Content("~/forums/reply/" + Model.Posts[0].Id)">@Resources.EnetaMvc.Reply</a></div>
			<div class="button"><a href="@Url.Content("~/forums/newtopic/" + Model.Forum.Id)">@Resources.EnetaMvc.NewTopic</a></div> 
		</td> 
	</tr> 
</table>

<table width="100%">
<tbody> 
<tr> 
	<td class="ms-ToolPaneTitle" colspan="2"> 
		<span id="ctl00_ctl16_g_4ce72c6c_1e27_4cfb_843a_765028b072ea_ctl00__titleLabel" class="post-title">@Model.Posts[0].Title</span>
		<!-- Lembit 27.09.2009: custom - moderaator --> 
		<!--div class="mode"><span>Moderaator</span> <a title="Gunnar" href="#"> <img width="16" height="16" src="images/img-69.jpg" alt="Gunnar"/> <span>Gunnar</span> </a></div--> 
		<!-- end moderaator --> 
	</td> 
</tr>
@foreach (var post in Model.Posts)
{ 
<tr class="post-row"> 
	<td width="140px" class="ms-TPHeader"> 
		<!-- Lembit 27.09.2009: custom - author link with class "author", in it avatar img 32x32 --> 
		<a title="@post.CreatedByUserName" href="@Url.Content("~/profiles/details/" + post.CreatedById)" class="author">
		<img width="32" height="32" src="@Html.GetProfileUrl(@post.CreatedById)" alt="minaise"/>@post.CreatedByUserName</a> 
		<!-- end custom -->																												
	</td> 
	<td width="80%" class="ms-TPHeader">
		<table width="100%" cellspacing="0" cellpadding="0" style="width:89%"> 
			<tbody> 
				<tr> 
					<td style="padding-left:86px">
							<a name="2392"></a>    
							<strong>Posted: </strong>19. apr 2012, 04:52
					</td> 
					<td id="ctl00_ctl16_g_4ce72c6c_1e27_4cfb_843a_765028b072ea_ctl00__messagesRepeater_ctl00_messageActionsContainer" align="right"> 
						<a href="@Url.Content("~/forums/reply/" + post.Id)">@Resources.EnetaMvc.Reply</a> &nbsp;|&nbsp;
						<a href="@Url.Content("~/forums/quote/" + post.Id)">@Resources.EnetaMvc.Quote</a> 
                        @if (User.IsInRole("Administrator"))
                        { 
                            <text>&nbsp;|&nbsp;</text>
                            <a href="@Url.Action("DeletePost","Forums", new { id = post.Id})">@Resources.EnetaMvc.Delete</a> 
                        }
					</td>
				</tr> 
			</tbody> 
		</table>
	</td> 
</tr> 
<tr class="ms-alternating"> 
	<td valign="top"></td> 
	<td valign="top" class="post-body" style="padding-left:86px;">@Html.Raw(post.QuotedBody)</td> 
</tr>
}
</tbody>
</table>